package demo;

import entity.Person;
import org.apache.commons.beanutils.BeanComparator;

public class BeanComparatorDemo {
    public static void main(String[] args) {
        BeanComparator comparator = new BeanComparator("name");
        Person tom = new Person(10, "Tom");
        Person jack = new Person(22, "Jack");
        System.out.println(comparator.compare(tom, jack));
    }
}


